package com.cw.frame.codegen.parameter;

import java.io.Serializable;

import org.springframework.util.StringUtils;

/**
 * 主键域
 *
* @author chenw
* @version 1.0.0
 */
public class PkField implements Serializable {

    private static final long serialVersionUID = 1345030691813382566L;
    private String pkIdDataType;//主键数据类型
    private String pkIdClass;// 主键实体类字段
    private String pkIdUp;// 首字母大写主键
    private String tablePkName;// 主键名
    private String pkIdCnName;//主键中文名
    private String pkId;// 主键数据库字段
    private String getterName;//get方法
    private String setterName;//set方法

    public String getPkIdDataType() {
        return pkIdDataType;
    }

    public void setPkIdDataType(String pkIdDataType) {
        this.pkIdDataType = pkIdDataType;
    }

    public String getPkIdClass() {
        return pkIdClass;
    }

    public void setPkIdClass(String pkIdClass) {
        this.pkIdClass = pkIdClass;
        String capitalizedFieldName = StringUtils.capitalize(pkIdClass);
        this.getterName = "get" + capitalizedFieldName;
        this.setterName = "set" + capitalizedFieldName;
    }

    public String getPkIdUp() {
        return pkIdUp;
    }

    public void setPkIdUp(String pkIdUp) {
        this.pkIdUp = pkIdUp;
    }

    public String getTablePkName() {
        return tablePkName;
    }

    public void setTablePkName(String tablePkName) {
        this.tablePkName = tablePkName;
    }

    public String getPkId() {
        return pkId;
    }

    public void setPkId(String pkId) {
        this.pkId = pkId;
    }

    public String getGetterName() {
        return getterName;
    }

    public void setGetterName(String getterName) {
        this.getterName = getterName;
    }

    public String getSetterName() {
        return setterName;
    }

    public void setSetterName(String setterName) {
        this.setterName = setterName;
    }

    public String getPkIdCnName() {
        return pkIdCnName;
    }

    public void setPkIdCnName(String pkIdCnName) {
        this.pkIdCnName = pkIdCnName;
    }

}
